Optimal. Leaf size=78 \[ -\frac{5 i x}{16}-\frac{i}{8 (-\cot (x)+i)}+\frac{3 i}{16 (\cot (x)+i)}+\frac{1}{32 (-\cot (x)+i)^2}-\frac{3}{32 (\cot (x)+i)^2}-\frac{i}{24 (\cot (x)+i)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0639931, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.231, Rules used = {3487, 44, 203} \[ -\frac{5 i x}{16}-\frac{i}{8 (-\cot (x)+i)}+\frac{3 i}{16 (\cot (x)+i)}+\frac{1}{32 (-\cot (x)+i)^2}-\frac{3}{32 (\cot (x)+i)^2}-\frac{i}{24 (\cot (x)+i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3487
Rule 44
Rule 203
Rubi steps
\begin{align*} \int \frac{\sin ^4(x)}{i+\cot (x)} \, dx &=\operatorname{Subst}\left (\int \frac{1}{(i-x)^3 (i+x)^4} \, dx,x,\cot (x)\right )\\ &=\operatorname{Subst}\left (\int \left (-\frac{1}{16 (-i+x)^3}-\frac{i}{8 (-i+x)^2}+\frac{i}{8 (i+x)^4}+\frac{3}{16 (i+x)^3}-\frac{3 i}{16 (i+x)^2}+\frac{5 i}{16 \left (1+x^2\right )}\right ) \, dx,x,\cot (x)\right )\\ &=\frac{1}{32 (i-\cot (x))^2}-\frac{i}{8 (i-\cot (x))}-\frac{i}{24 (i+\cot (x))^3}-\frac{3}{32 (i+\cot (x))^2}+\frac{3 i}{16 (i+\cot (x))}+\frac{5}{16} i \operatorname{Subst}\left (\int \frac{1}{1+x^2} \, dx,x,\cot (x)\right )\\ &=-\frac{5 i x}{16}+\frac{1}{32 (i-\cot (x))^2}-\frac{i}{8 (i-\cot (x))}-\frac{i}{24 (i+\cot (x))^3}-\frac{3}{32 (i+\cot (x))^2}+\frac{3 i}{16 (i+\cot (x))}\\ \end{align*}
Mathematica [A] time = 0.121078, size = 51, normalized size = 0.65 \[ \frac{1}{192} (-15 \cos (2 x)+6 \cos (4 x)-i (60 x-45 \sin (2 x)+9 \sin (4 x)-\sin (6 x)-i \cos (6 x))) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.068, size = 66, normalized size = 0.9 \begin{align*}{\frac{{\frac{i}{2}}}{\tan \left ( x \right ) -i}}-{\frac{{\frac{i}{24}}}{ \left ( \tan \left ( x \right ) -i \right ) ^{3}}}-{\frac{7}{32\, \left ( \tan \left ( x \right ) -i \right ) ^{2}}}-{\frac{5\,\ln \left ( \tan \left ( x \right ) -i \right ) }{32}}+{\frac{{\frac{3\,i}{16}}}{i+\tan \left ( x \right ) }}+{\frac{1}{32\, \left ( i+\tan \left ( x \right ) \right ) ^{2}}}+{\frac{5\,\ln \left ( i+\tan \left ( x \right ) \right ) }{32}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.63793, size = 224, normalized size = 2.87 \begin{align*} \frac{1}{384} \,{\left (-48 i \, x e^{\left (6 i \, x\right )} +{\left (-72 i \, x e^{\left (4 i \, x\right )} - 3 \, e^{\left (8 i \, x\right )} + 24 \, e^{\left (6 i \, x\right )} - 24 \, e^{\left (2 i \, x\right )} + 3\right )} e^{\left (2 i \, x\right )} + 6 \, e^{\left (8 i \, x\right )} - 36 \, e^{\left (4 i \, x\right )} + 12 \, e^{\left (2 i \, x\right )} - 2\right )} e^{\left (-6 i \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.434799, size = 54, normalized size = 0.69 \begin{align*} - \frac{5 i x}{16} - \frac{e^{4 i x}}{128} + \frac{5 e^{2 i x}}{64} - \frac{5 e^{- 2 i x}}{32} + \frac{5 e^{- 4 i x}}{128} - \frac{e^{- 6 i x}}{192} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.25479, size = 85, normalized size = 1.09 \begin{align*} \frac{15 \, \tan \left (x\right )^{2} + 18 i \, \tan \left (x\right ) - 5}{64 \,{\left (-i \, \tan \left (x\right ) + 1\right )}^{2}} + \frac{55 \, \tan \left (x\right )^{3} - 69 i \, \tan \left (x\right )^{2} - 15 \, \tan \left (x\right ) - 7 i}{192 \,{\left (\tan \left (x\right ) - i\right )}^{3}} + \frac{5}{32} \, \log \left (\tan \left (x\right ) + i\right ) - \frac{5}{32} \, \log \left (\tan \left (x\right ) - i\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]